package com.esiran.payadmin.controller;

import com.esiran.payadmin.model.UserCategory;
import com.esiran.payadmin.service.UserCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/category")
public class CategoryController {
    private final UserCategoryService userCategoryService;
    @Autowired
    public CategoryController(UserCategoryService userCategoryService) {
        this.userCategoryService = userCategoryService;
    }

    @RequestMapping("{id}")
    public String detail(@PathVariable Long id){
        UserCategory userCategory = userCategoryService.selectById(id);
        return "category";
    }
}
